package cn.jn.lhm.part05;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author lhm 2753914576@qq.com
 * @time 2023/4/5 - 22:32
 **/
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel client = SocketChannel.open();
        client.connect(new InetSocketAddress("localhost", 9999));
        client.write(Charset.defaultCharset().encode("1312312312312312312"));
        System.out.println("client over...");
    }
}
